StoredLearningSession.ProcessNavigationRequests Method

Processes all of the pending navigation requests in the current activity's data model. Returns true if this caused a navigation request to execute.

Parent Type: StoredLearningSession

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public override bool ProcessNavigationRequests ()

Exceptions
Exception type Condition
InvalidOperationException

Thrown if there is no current activity in the session.

SequencingException

Thrown if the state of the session, such as the current sequencing rules, do not allow processing the requested navigation.

Remarks

After this method, the state of the session and its current activity is determined by the navigation commands (if any) that were set in the LearningDataModel of the current activity prior to calling this method. If there is a navigation request to move to a different activity, or to exit the current activity, this method will trigger that pending navigation request.

Pending navigation requests for activities other than the current activity are ignored.

The LearningSession current activity may change after calling this method. It may have changed due to a pending navigation request in the current activity's data model. It may have changed due to the postConditionRules associated with the activity in the package manifest.

If the activity is being paused, and should be left in a state where it can be resumed, then the caller should set the NavigationRequest.ExitMode value of LearningDataModel.NavigationRequest to Suspend before calling this method.

This method does not save the data model after processing these navigation requests, so it is recommended that the application call CommitChanges after calling this method.